<template>
	<view class="context">
		<view style="height: 20rpx;"></view>
		<view class="sett_list">
			<view @click="goAgr" class="list_item">
				<text>隐私协议</text>
				<image src="@/static/image/home/arrow.jpg" mode=""></image>
			</view>
			<!-- <view class="list_item">
				<text>关于我们</text>
				<image src="@/static/image/home/arrow.jpg" mode=""></image>
			</view>
			<view class="list_item">
				<text>注销账号</text>
				<image src="@/static/image/home/arrow.jpg" mode=""></image>
			</view> -->
			<view @click="opPop" class="list_item">
				<text>服务资质</text>
				<image src="@/static/image/home/arrow.jpg" mode=""></image>
			</view>
		</view>
		<!-- <view v-show="isLogin" @click="logOut" :style="{ 'bottom' : $getBottomHight() + + 20 + 'px'}" class="address_btn">退出登录</view> -->
		
		
		<uni-popup ref="popup" type="center" :is-mask-click="false">
			<view class="pop_image">
				<image @click="OffPop" class="pop_del" src="@/static/image/home/Off.png" mode=""></image>
				<image class="imga" :src="aptitude" mode=""></image>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import { setQualifications } from '@/api/my.js'
	import { mapMutations, mapGetters } from 'vuex'
	export default {
		data() {
			return {
				aptitude: ''
			}
		},
		computed: {
			...mapGetters('user', ['isLogin'])
		},
		onLoad() {
			this.goQualifications()
		},
		methods: {
			...mapMutations('user', ['pushOut']),
			logOut() {
				uni.showModal({
					title: '提示',
					content: '确定要退出当前登录吗?',
					success: res => {
						if (res.confirm) {
							this.pushOut()
							uni.switchTab({
								url: '/pages/tabBar/home'
							})
						}
					}
				})
			},
			goAgr() {
				uni.navigateTo({
					url: '/pages/agreement/agreement'
				})
			},
			OffPop() {
				this.$refs.popup.close()
				
			},
			opPop() {
				this.$refs.popup.open()
			},
			goQualifications() {
				setQualifications().then(res => {
					if(res.code === 1) {
						this.aptitude = res.data
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	/deep/ .uni-popup__wrapper {
		width: 100%;
	}
	.pop_image {
		width: 85vw;
		margin:  0 auto;
		.pop_del {
			width: 50rpx;
			height: 50rpx;
			position: absolute;
			top: -80rpx;
			z-index: 999;
			right: 6rpx;
		}
		.imga {
			width: 100%;
		}
	}
	.address_btn {
		position: fixed;
		right: 30rpx;
		left: 30rpx;
		padding: 20rpx 0;
		text-align: center;
		font-size: 30rpx;
		border-radius: 45rpx;
		color: #333;
		background-color: #fff;
	}
	.sett_list {
		background-color: #fff;
		width: 95%;
		margin: 0 auto;
		border-radius: 20rpx;
		.list_item {
			padding: 30rpx 30rpx;
			display: flex;
			justify-content: space-between;
			text {
				font-size: 30rpx;
				font-weight: bold;
			}
			image {
				width: 30rpx;
				height: 30rpx;
			}
		}
	}
	.context {
		
	}
</style>
